.class Lrexsee/open/RexseeRenRenSNS$3;
.super Ljava/lang/Object;
.source "RexseeRenRenSNS.java"

# interfaces
.implements Ljava/lang/Runnable;


# annotations
.annotation system Ldalvik/annotation/EnclosingMethod;
    value = Lrexsee/open/RexseeRenRenSNS;->loginAndRequest(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)V
.end annotation

.annotation system Ldalvik/annotation/InnerClass;
    accessFlags = 0x0
    name = null
.end annotation


# instance fields
.field final synthetic this$0:Lrexsee/open/RexseeRenRenSNS;

.field private final synthetic val$arguments:Ljava/lang/String;

.field private final synthetic val$progressTitle:Ljava/lang/String;

.field private final synthetic val$successMessage:Ljava/lang/String;


# direct methods
.method constructor <init>(Lrexsee/open/RexseeRenRenSNS;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)V
    .locals 0

    .prologue
    .line 1
    iput-object p1, p0, Lrexsee/open/RexseeRenRenSNS$3;->this$0:Lrexsee/open/RexseeRenRenSNS;

    iput-object p2, p0, Lrexsee/open/RexseeRenRenSNS$3;->val$arguments:Ljava/lang/String;

    iput-object p3, p0, Lrexsee/open/RexseeRenRenSNS$3;->val$progressTitle:Ljava/lang/String;

    iput-object p4, p0, Lrexsee/open/RexseeRenRenSNS$3;->val$successMessage:Ljava/lang/String;

    .line 255
    invoke-direct {p0}, Ljava/lang/Object;-><init>()V

    return-void
.end method

.method static synthetic access$0(Lrexsee/open/RexseeRenRenSNS$3;)Lrexsee/open/RexseeRenRenSNS;
    .locals 1

    .prologue
    .line 255
    iget-object v0, p0, Lrexsee/open/RexseeRenRenSNS$3;->this$0:Lrexsee/open/RexseeRenRenSNS;

    return-object v0
.end method


# virtual methods
.method public run()V
    .locals 14

    .prologue
    .line 259
    :try_start_0
    const-string v1, "http://graph.renren.com/oauth/grant?client_id={consumerKey}&redirect_uri=http%3A%2F%2Fgraph.renren.com%2Foauth%2Flogin_success.html&response_type=token&display=popup"

    const-string v2, "{consumerKey}"

    iget-object v4, p0, Lrexsee/open/RexseeRenRenSNS$3;->this$0:Lrexsee/open/RexseeRenRenSNS;

    # getter for: Lrexsee/open/RexseeRenRenSNS;->mKey:Ljava/lang/String;
    invoke-static {v4}, Lrexsee/open/RexseeRenRenSNS;->access$1(Lrexsee/open/RexseeRenRenSNS;)Ljava/lang/String;

    move-result-object v4

    invoke-virtual {v1, v2, v4}, Ljava/lang/String;->replace(Ljava/lang/CharSequence;Ljava/lang/CharSequence;)Ljava/lang/String;

    move-result-object v3

    .line 260
    .local v3, "url":Ljava/lang/String;
    const-string v13, ""

    .line 261
    .local v13, "permissions":Ljava/lang/String;
    const/4 v12, 0x0

    .local v12, "i":I
    :goto_0
    iget-object v1, p0, Lrexsee/open/RexseeRenRenSNS$3;->this$0:Lrexsee/open/RexseeRenRenSNS;

    # getter for: Lrexsee/open/RexseeRenRenSNS;->mPermissions:Ljava/util/ArrayList;
    invoke-static {v1}, Lrexsee/open/RexseeRenRenSNS;->access$2(Lrexsee/open/RexseeRenRenSNS;)Ljava/util/ArrayList;

    move-result-object v1

    invoke-virtual {v1}, Ljava/util/ArrayList;->size()I

    move-result v1

    if-lt v12, v1, :cond_0

    .line 265
    new-instance v1, Ljava/lang/StringBuilder;

    invoke-static {v3}, Ljava/lang/String;->valueOf(Ljava/lang/Object;)Ljava/lang/String;

    move-result-object v2

    invoke-direct {v1, v2}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V

    const-string v2, "&scope="

    invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v1

    invoke-virtual {v1, v13}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v1

    invoke-virtual {v1}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v3

    .line 266
    new-instance v0, Lrexsee/dialog/PopupWindow;

    iget-object v1, p0, Lrexsee/open/RexseeRenRenSNS$3;->this$0:Lrexsee/open/RexseeRenRenSNS;

    # getter for: Lrexsee/open/RexseeRenRenSNS;->mBrowser:Lrexsee/core/browser/Browser;
    invoke-static {v1}, Lrexsee/open/RexseeRenRenSNS;->access$0(Lrexsee/open/RexseeRenRenSNS;)Lrexsee/core/browser/Browser;

    move-result-object v1

    const-string v2, "RenRenSNSVerifierWindow"

    const-string v4, "window-cancelable:false;"

    const/4 v5, 0x0

    invoke-direct/range {v0 .. v5}, Lrexsee/dialog/PopupWindow;-><init>(Lrexsee/core/browser/Browser;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/Runnable;)V

    .line 267
    .local v0, "mVerifierWindow":Lrexsee/dialog/PopupWindow;
    iget-object v1, v0, Lrexsee/dialog/PopupWindow;->mChild:Lrexsee/core/browser/Browser;

    const/4 v2, 0x0

    iput-boolean v2, v1, Lrexsee/core/browser/Browser;->allowErrorDialog:Z

    .line 268
    iget-object v1, v0, Lrexsee/dialog/PopupWindow;->mChild:Lrexsee/core/browser/Browser;

    iget-object v1, v1, Lrexsee/core/browser/Browser;->pageBeforeStartListeners:Lrexsee/core/browser/clazz/PageBeforeStartListeners;

    new-instance v4, Lrexsee/open/RexseeRenRenSNS$3$1;

    iget-object v6, p0, Lrexsee/open/RexseeRenRenSNS$3;->val$arguments:Ljava/lang/String;

    iget-object v7, p0, Lrexsee/open/RexseeRenRenSNS$3;->val$progressTitle:Ljava/lang/String;

    iget-object v8, p0, Lrexsee/open/RexseeRenRenSNS$3;->val$successMessage:Ljava/lang/String;

    move-object v5, p0

    move-object v9, v0

    invoke-direct/range {v4 .. v9}, Lrexsee/open/RexseeRenRenSNS$3$1;-><init>(Lrexsee/open/RexseeRenRenSNS$3;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Lrexsee/dialog/PopupWindow;)V

    invoke-virtual {v1, v4}, Lrexsee/core/browser/clazz/PageBeforeStartListeners;->add(Lrexsee/core/browser/clazz/PageBeforeStartListeners$PageBeforeStartListener;)V

    .line 277
    iget-object v1, v0, Lrexsee/dialog/PopupWindow;->mChild:Lrexsee/core/browser/Browser;

    iget-object v1, v1, Lrexsee/core/browser/Browser;->pageReadyListeners:Lrexsee/core/browser/clazz/PageReadyListeners;

    new-instance v4, Lrexsee/open/RexseeRenRenSNS$3$2;

    iget-object v7, p0, Lrexsee/open/RexseeRenRenSNS$3;->val$arguments:Ljava/lang/String;

    iget-object v8, p0, Lrexsee/open/RexseeRenRenSNS$3;->val$progressTitle:Ljava/lang/String;

    iget-object v9, p0, Lrexsee/open/RexseeRenRenSNS$3;->val$successMessage:Ljava/lang/String;

    move-object v5, p0

    move-object v6, v0

    invoke-direct/range {v4 .. v9}, Lrexsee/open/RexseeRenRenSNS$3$2;-><init>(Lrexsee/open/RexseeRenRenSNS$3;Lrexsee/dialog/PopupWindow;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)V

    invoke-virtual {v1, v4}, Lrexsee/core/browser/clazz/PageReadyListeners;->add(Lrexsee/core/browser/clazz/PageReadyListeners$PageReadyListener;)V

    .line 287
    new-instance v10, Landroid/widget/Button;

    iget-object v1, p0, Lrexsee/open/RexseeRenRenSNS$3;->this$0:Lrexsee/open/RexseeRenRenSNS;

    # getter for: Lrexsee/open/RexseeRenRenSNS;->mBrowser:Lrexsee/core/browser/Browser;
    invoke-static {v1}, Lrexsee/open/RexseeRenRenSNS;->access$0(Lrexsee/open/RexseeRenRenSNS;)Lrexsee/core/browser/Browser;

    move-result-object v1

    invoke-virtual {v1}, Lrexsee/core/browser/Browser;->getContext()Landroid/content/Context;

    move-result-object v1

    invoke-direct {v10, v1}, Landroid/widget/Button;-><init>(Landroid/content/Context;)V

    .line 288
    .local v10, "cancel":Landroid/widget/Button;
    const/high16 v1, 0x1040000

    invoke-virtual {v10, v1}, Landroid/widget/Button;->setText(I)V

    .line 289
    new-instance v1, Lrexsee/open/RexseeRenRenSNS$3$3;

    invoke-direct {v1, p0, v0}, Lrexsee/open/RexseeRenRenSNS$3$3;-><init>(Lrexsee/open/RexseeRenRenSNS$3;Lrexsee/dialog/PopupWindow;)V

    invoke-virtual {v10, v1}, Landroid/widget/Button;->setOnClickListener(Landroid/view/View$OnClickListener;)V

    .line 295
    new-instance v1, Landroid/widget/LinearLayout$LayoutParams;

    const/4 v2, -0x1

    const/16 v4, 0x46

    const/high16 v5, 0x3f800000    # 1.0f

    invoke-direct {v1, v2, v4, v5}, Landroid/widget/LinearLayout$LayoutParams;-><init>(IIF)V

    invoke-virtual {v10, v1}, Landroid/widget/Button;->setLayoutParams(Landroid/view/ViewGroup$LayoutParams;)V

    .line 296
    iget-object v1, v0, Lrexsee/dialog/PopupWindow;->mBottomLayout:Landroid/widget/LinearLayout;

    const/4 v2, 0x0

    invoke-virtual {v1, v2}, Landroid/widget/LinearLayout;->setOrientation(I)V

    .line 297
    iget-object v1, v0, Lrexsee/dialog/PopupWindow;->mBottomLayout:Landroid/widget/LinearLayout;

    const/4 v2, 0x0

    const/4 v4, 0x5

    const/4 v5, 0x0

    const/4 v6, 0x0

    invoke-virtual {v1, v2, v4, v5, v6}, Landroid/widget/LinearLayout;->setPadding(IIII)V

    .line 298
    iget-object v1, v0, Lrexsee/dialog/PopupWindow;->mBottomLayout:Landroid/widget/LinearLayout;

    invoke-virtual {v1, v10}, Landroid/widget/LinearLayout;->addView(Landroid/view/View;)V

    .line 299
    invoke-virtual {v0}, Lrexsee/dialog/PopupWindow;->start()V

    .line 303
    .end local v0    # "mVerifierWindow":Lrexsee/dialog/PopupWindow;
    .end local v3    # "url":Ljava/lang/String;
    .end local v10    # "cancel":Landroid/widget/Button;
    .end local v12    # "i":I
    .end local v13    # "permissions":Ljava/lang/String;
    :goto_1
    return-void

    .line 262
    .restart local v3    # "url":Ljava/lang/String;
    .restart local v12    # "i":I
    .restart local v13    # "permissions":Ljava/lang/String;
    :cond_0
    const-string v1, ""

    invoke-virtual {v13, v1}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z

    move-result v1

    if-nez v1, :cond_1

    new-instance v1, Ljava/lang/StringBuilder;

    invoke-static {v13}, Ljava/lang/String;->valueOf(Ljava/lang/Object;)Ljava/lang/String;

    move-result-object v2

    invoke-direct {v1, v2}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V

    const-string v2, "+"

    invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v1

    invoke-virtual {v1}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v13

    .line 263
    :cond_1
    new-instance v2, Ljava/lang/StringBuilder;

    invoke-static {v13}, Ljava/lang/String;->valueOf(Ljava/lang/Object;)Ljava/lang/String;

    move-result-object v1

    invoke-direct {v2, v1}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V

    iget-object v1, p0, Lrexsee/open/RexseeRenRenSNS$3;->this$0:Lrexsee/open/RexseeRenRenSNS;

    # getter for: Lrexsee/open/RexseeRenRenSNS;->mPermissions:Ljava/util/ArrayList;
    invoke-static {v1}, Lrexsee/open/RexseeRenRenSNS;->access$2(Lrexsee/open/RexseeRenRenSNS;)Ljava/util/ArrayList;

    move-result-object v1

    invoke-virtual {v1, v12}, Ljava/util/ArrayList;->get(I)Ljava/lang/Object;

    move-result-object v1

    check-cast v1, Ljava/lang/String;

    invoke-virtual {v2, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v1

    invoke-virtual {v1}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
    :try_end_0
    .catch Ljava/lang/Exception; {:try_start_0 .. :try_end_0} :catch_0

    move-result-object v13

    .line 261
    add-int/lit8 v12, v12, 0x1

    goto/16 :goto_0

    .line 300
    .end local v3    # "url":Ljava/lang/String;
    .end local v12    # "i":I
    .end local v13    # "permissions":Ljava/lang/String;
    :catch_0
    move-exception v1

    move-object v11, v1

    .line 301
    .local v11, "e":Ljava/lang/Exception;
    iget-object v1, p0, Lrexsee/open/RexseeRenRenSNS$3;->this$0:Lrexsee/open/RexseeRenRenSNS;

    # getter for: Lrexsee/open/RexseeRenRenSNS;->mBrowser:Lrexsee/core/browser/Browser;
    invoke-static {v1}, Lrexsee/open/RexseeRenRenSNS;->access$0(Lrexsee/open/RexseeRenRenSNS;)Lrexsee/core/browser/Browser;

    move-result-object v1

    iget-object v2, p0, Lrexsee/open/RexseeRenRenSNS$3;->this$0:Lrexsee/open/RexseeRenRenSNS;

    invoke-virtual {v2}, Lrexsee/open/RexseeRenRenSNS;->getInterfaceName()Ljava/lang/String;

    move-result-object v2

    invoke-virtual {v1, v2, v11}, Lrexsee/core/browser/Browser;->exception(Ljava/lang/String;Ljava/lang/Exception;)V

    goto :goto_1
.end method
